﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _13._3
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Connection myc= new Connection();
            myc.Name= "myc1";
            Connection myc2 = new Connection();
            myc2.Name = "myc2";

            Display myD= new Display();
            myc.MessageArrived += myD.DisplayMessage;
            myc2.MessageArrived += myD.DisplayMessage;
            myc.Connect();
            myc2.Connect();
            System.Threading.Thread.Sleep(1000);
            Console.ReadLine();
        }
    }
}
